/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Main;

import Server.ChatServer;
import serverbalancing.ServerBalancing;

/**
 *
 * @author Thanhpv
 * Create on 7:15:36 AM Dec 18, 2013
 */
public class NewClass {
    public static void main(String... args){
        int count = 0;
        ServerBalancing serverBalancing = ServerBalancing.createInstance();
        serverBalancing.addChatServer("localhost", 9090);
        serverBalancing.addChatServer("localhost", 9091);
        serverBalancing.addChatServer("localhost", 9092);
        serverBalancing.addChatServer("localhost", 9093);
        ChatServer chatServer;
        for(int i=0; i<10; i++){
            chatServer = serverBalancing.getChatServer(count++);
            System.out.println(chatServer.getNumUser());
        }
    }
}
